package com.xqboss.apps.dto.user;

import com.xqboss.apps.enums.user.UserWalletEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 用户钱包详情请求体
 *
 * @author Administrator
 * @date 2023/8/19
 */
@ApiModel
@Data
public class WebWalletAdjustDto {

    @ApiModelProperty(value = "用户ID", required = true)
    @NotNull(message = "请输入用户ID")
    private Long userId;

    @ApiModelProperty(value = "用户钱包类型", required = true)
    @NotNull(message = "请选择钱包类型")
    private UserWalletEnum type;

    @ApiModelProperty(value = "调整方式 0减少，1增加", required = true)
    @NotNull(message = "请选择调整方式")
    private Integer adjustType;

    @ApiModelProperty(value = "调整金额", required = true)
    @NotNull(message = "请输入调整金额")
    @DecimalMax(value = "5000", message = "最大值为5000")
    @DecimalMin(value = "0.01", message = "最小值为0.01")
    private BigDecimal amount;

    @ApiModelProperty(value = "备注", required = true)
    @NotBlank(message = "请输入描述")
    private String remark;
}
